package com.example.demo.service.mq.rabbitmq;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class RabbitmqServiceImpl {

    @Autowired
    private RabbitTemplate rabbitTemplate;

    public void sendWork(String routingKey,Object workMessage){
        rabbitTemplate.convertAndSend("",routingKey,workMessage);
    }
}
